Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore cast-on-assign behavior on Django 1.8+ #61

Merged
merged 1 commit into from
Jun 27, 2016
Merged

Restore cast-on-assign behavior on Django 1.8+ #61

merged 1 commit into from
Jun 27, 2016

Conversation

akx
Copy link
Contributor

@akx akx commented Jun 27, 2016

Turns out the future-deprecated SubfieldBase class did more than what was initially thought. Since it is removed in Django 1.10+, for clarity we no longer use it at all.

Instead we intern the behavior of its Creator descriptor class as CastOnAssignDescriptor.

Fixes #60
Refs https://code.djangoproject.com/ticket/26807
Refs 8260050

Turns out the future-deprecated SubfieldBase class did more
than what was initially thought.  Since it is removed in
Django 1.10+, for clarity we no longer use it at all.
Instead we intern the behavior of its `Creator` descriptor
class as `CastOnAssignDescriptor`.

Test cases and original bug report by @andrewdodd. Thanks!

Fixes #60
Refs https://code.djangoproject.com/ticket/26807
Refs 8260050
@suutari-ai
Copy link
Contributor

Nice, thanks @akx! :shipit:

@akx akx merged commit 39498a5 into master Jun 27, 2016
@akx akx deleted the issue-60 branch June 27, 2016 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants